#include "yanseban.h"
#include <QMouseEvent>

YanseBan::YanseBan ( QWidget* parent ) : QQtClickWidget ( parent )
{
    connect ( this, SIGNAL ( clickWithPoint ( QPoint ) ),
              this, SLOT ( slotColorChanged ( QPoint ) ) );
}

void YanseBan::setBackgroundPicture ( QString picture )
{
    setPixmap ( picture );
    mImage.load ( picture );
}

void YanseBan::slotColorChanged ( QPoint point )
{
    emit colorChanged ( mImage.pixel ( point ) );
}

